package org.xxpay.service.dao.mapper;

import org.apache.ibatis.annotations.Param;
import org.xxpay.core.entity.PayAlizftMchInfo;
import org.xxpay.core.entity.PayAlizftMchInfoExample;

import java.util.List;
import java.util.Map;

public interface PayAlizftMchInfoMapper {
    long countByExample(PayAlizftMchInfoExample example);

    int deleteByExample(PayAlizftMchInfoExample example);

    int deleteByPrimaryKey(Long subMchId);

    int insert(PayAlizftMchInfo record);

    int insertSelective(PayAlizftMchInfo record);

    List<PayAlizftMchInfo> selectByExampleWithBLOBs(PayAlizftMchInfoExample example);

    List<PayAlizftMchInfo> selectByExample(PayAlizftMchInfoExample example);

    PayAlizftMchInfo selectByPrimaryKey(Long subMchId);

    int updateByExampleSelective(@Param("record") PayAlizftMchInfo record, @Param("example") PayAlizftMchInfoExample example);

    int updateByExampleWithBLOBs(@Param("record") PayAlizftMchInfo record, @Param("example") PayAlizftMchInfoExample example);

    int updateByExample(@Param("record") PayAlizftMchInfo record, @Param("example") PayAlizftMchInfoExample example);

    int updateByPrimaryKeySelective(PayAlizftMchInfo record);

    int updateByPrimaryKeyWithBLOBs(PayAlizftMchInfo record);

    int updateByPrimaryKey(PayAlizftMchInfo record);

    PayAlizftMchInfo selectBaseInfoById(Long subMchId);

    String getOneAvailableSmid(@Param("passageTemplateId") Long passageTemplateId, @Param("amount") Long amount,
                               @Param("qRPaySupport") Long qRPaySupport, @Param("appPaySupport") Long appPaySupport,
                               @Param("wapPaySupport") Long wapPaySupport, @Param("pcPaySupport") Long pcPaySupport
                               );

    int updateDayAmount(@Param("smid") String smid, @Param("ppaId") Integer ppaId, @Param("amount") Long amount);


    List<Map> subData(Map param);

    Long subDataCount(Map param);

    PayAlizftMchInfo selectBaseInfoByPPAIdAndSmId(@Param("ppaId")Integer ppaId, @Param("smid")String smid);
}